package com.unism.unisdk.common;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.unism.unisdk.common.enumObj.HttpMethod;
import com.unism.unisdk.common.enumObj.Protocol;

@Target({java.lang.annotation.ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface OpenAPI{
  //http的请求方法类型
  public abstract HttpMethod httpMethod();
  //http的请求的uri
  public abstract String uriPath();

  public abstract String resultJsonKey() default "";
  //http的请求超时时间
  public abstract int requestTimeout() default 0;
  //api采用的协议
  public abstract Protocol protocol() default Protocol.HTTP;
  public static enum PostType{
    JSON, FILE ,XML;
  }
 
}